﻿using Nancy;
using Nancy.Security;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RinNote.Server.Controller
{
    public class TestController : NancyModule
    {
        public TestController() : base("test")
        {
            this.RequiresAuthentication();

            Get["/Hello"] = x => {
                return "World";
                //return this.Request.Query.value;
            };

            Get["/Info"] = x => {
                if (Request.Session["user"] == null)
                {
                    return "oops";
                }
                else
                {
                    return Request.Session["user"].ToString();
                }

            };
        }
    }
}
